package com.mall.user.dto;

import com.mall.commons.result.AbstractRequest;
import com.mall.commons.tool.exception.ValidateException;
import com.mall.user.constants.SysRetCodeConstants;
import lombok.Data;

import javax.xml.bind.ValidationException;

/**
 * 创建日期: 2022-01-20-11-24
 * author : LL
 * description:
 */
@Data
public class UserinfoRequest extends AbstractRequest {
    private Long uid;

    @Override
    public void requestCheck() throws ValidationException {
        if (uid == null || uid < 0){
            throw new ValidateException(
                    SysRetCodeConstants.REQUEST_CHECK_FAILURE.getCode(),
                    SysRetCodeConstants.REQUEST_CHECK_FAILURE.getMessage());
        }
    }
}